<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="add">
    <button v-on:click="show=!show">点我试试</button>
    <h1 v-if="show">v-if</h1>
    <h1 v-show="show">v-show</h1>
</div>
</body>
<script src="node_modules/vue/dist/vue.js"></script>
<script>
    var add = new Vue({
        el: "#add",
        data:{
            show:true
        }
    })
</script>
</html>